﻿using System;
using MessagePack.Formatters;

namespace MessagePack.Unity
{
	// Token: 0x02000136 RID: 310
	public class UnityResolver : IFormatterResolver
	{
		// Token: 0x0600049B RID: 1179 RVA: 0x00014408 File Offset: 0x00012808
		private UnityResolver()
		{
		}

		// Token: 0x0600049C RID: 1180 RVA: 0x00014410 File Offset: 0x00012810
		public IMessagePackFormatter<T> GetFormatter<T>()
		{
			return UnityResolver.FormatterCache<T>.formatter;
		}

		// Token: 0x040001F5 RID: 501
		public static IFormatterResolver Instance = new UnityResolver();

		// Token: 0x02000137 RID: 311
		private static class FormatterCache<T>
		{
			// Token: 0x040001F6 RID: 502
			public static readonly IMessagePackFormatter<T> formatter = (IMessagePackFormatter<T>)UnityResolveryResolverGetFormatterHelper.GetFormatter(typeof(T));
		}
	}
}
